<%--
  Created by IntelliJ IDEA.
  User: pzw
  Date: 2015/4/1
  Time: 12:10
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <%@include file="../includes/head.jsp" %>
    <title>${menu.menuName}</title>
    <link rel="stylesheet" type="text/css"
          href="<c:url value="/js/global/plugins/datatables/plugins/bootstrap/dataTables.bootstrap.css"/>"/>
</head>
<body class="page-header-fixed page-quick-sidebar-over-content">
<%@include file="../includes/top.jsp" %>
<div class="page-container">
    <%@include file="../includes/sidebar.jsp" %>
    <div class="page-content-wrapper">
        <div class="page-content">
            <%@include file="../includes/current.jsp" %>
            <div class="row">
                <div class="col-md-12">
                    <div class="portlet">
                        <div class="portlet-title">
                            <div class="caption">
                                <i class="${menu.icon}"></i>${menu.menuName}
                            </div>
                            <div class="tools">
                                <a href="javascript:;" class="collapse"></a>
                            </div>
                            <div class="actions">
                                <a href="javascript:;" class="btn default yellow-stripe" id="addFormula"><i
                                        class="fa fa-plus-square-o"></i><span class="hidden-480"> <spring:message
                                        code="new"/></span></a>
                                <a href="javascript:;" class="btn default yellow-stripe" id="dataTableReload"><i
                                        class="fa fa-refresh"></i><span class="hidden-480"> <spring:message
                                        code="refresh"/></span></a>

                                <div class="btn-group">
                                    <a class="btn default yellow-stripe" href="#" data-toggle="dropdown">
                                        <i class="fa fa-list"></i>
                                        <span class="hidden-480"><spring:message code="columns"/></span>
                                        <i class="fa fa-angle-down"></i>
                                    </a>

                                    <div class="dropdown-menu hold-on-click dropdown-checkboxes pull-right"
                                         id="dataTableToggleColumn">
                                        <label><input type="checkbox" checked="checked" data-column="0"><spring:message
                                                code="formulaName"/></label>
                                        <label><input type="checkbox" checked="checked" data-column="1"><spring:message
                                                code="formulaDescription"/></label>
                                        <label><input type="checkbox" checked="checked" data-column="6"><spring:message
                                                code="actions"/></label>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="portlet-body">
                            <div class="table-container">
                                <table class="table table-striped table-bordered table-hover" id="dataTable">
                                    <thead>
                                    <tr role="row" class="heading">
                                        <th><spring:message code="formulaName"/></th>
                                        <th><spring:message code="formulaDescription"/></th>
                                        <th>公式维护</th>
                                        <th>公式类型</th>
                                        <th>操作标识</th>
                                        <th><spring:message code="actions"/></th>
                                    </tr>
                                    <tr role="row" class="filter">
                                        <td>
                                            <input type="text" class="form-control form-filter input-sm"
                                                   name="formulaNameQuery"
                                                   id="formulaNameQuery"
                                                   placeholder="<spring:message code="formulaName"/>">
                                        </td>
                                        <td>
                                            <input type="text" class="form-control form-filter input-sm"
                                                   name="descriptionQuery"
                                                   id="memoQuery"
                                                   placeholder="<spring:message code="formulaDescription"/>">
                                        </td>
                                        <td>
                                            <input type="text" class="form-control form-filter input-sm"
                                                   name="descriptionQuery"
                                                   id="descriptionQuery"
                                                   placeholder="公式描述">
                                        </td>
                                        <td>
                                            <input type="text" class="form-control form-filter input-sm"
                                                   placeholder="公式类型" data-gautoflag="gAutoFormulaType"
                                                   id="typeQuery" name="typeQuery">
                                        </td>
                                        <td>
                                            <input type="text" class="form-control form-filter input-sm"
                                                   placeholder="操作标识" id="categoryQuery" name="categoryQuery">
                                        </td>
                                        <td>
                                            <div class="margin-bottom-5">
                                                <a class="btn btn-sm yellow filter-submit margin-bottom">
                                                    <i class="fa fa-search"></i><spring:message code="query"/></a>
                                                <a class="btn btn-sm red filter-cancel">
                                                    <i class="fa fa-undo"></i><spring:message code="reset"/></a>
                                            </div>
                                        </td>
                                    </tr>
                                    </thead>
                                    <tbody>
                                    </tbody>
                                </table>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<div class="modal fade bs-modal-lg" id="modalDialog" tabindex="-1" data-keyboard="false" aria-hidden="true"
     data-backdrop="static">
    <div class="modal-dialog modal-lg">
        <div class="modal-content" id="modalContent">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
                <h4 class="modal-title" id="modalTitle"></h4>
            </div>
            <div class="modal-body form">
                <form id="dialogForm" class="form-horizontal">
                    <div class="form-body">
                        <div class="row">
                            <div class="col-md-6">
                                <div class="form-group">
                                    <label class="col-md-4 control-label"><spring:message code="formulaName"/><span
                                            class="required"> * </span></label>

                                    <div class="col-md-8">
                                        <input type="hidden" id="id">
                                        <input type="text" class="form-control input-medium"
                                               placeholder="<spring:message code="formulaName"/>"
                                               id="formulaName" name="formulaName">
                                    </div>
                                </div>
                            </div>
                            <div class="col-md-6">
                                <div class="form-group last">
                                    <label class="col-md-4 control-label">公式描述<span
                                            class="required"> * </span></label>

                                    <div class="col-md-8">
                                        <input type="text" class="form-control input-medium"
                                               placeholder="公式描述"
                                               id="memo" name="memo">
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-md-6">
                                <div class="form-group last">
                                    <label class="col-md-4 control-label">公式类型<span
                                            class="required"> * </span></label>

                                    <div class="col-md-8">
                                        <input type="text" class="form-control input-medium"
                                               placeholder="公式类型" data-gautoflag="gAutoFormulaType"
                                               id="formulaType" name="formulaType">
                                    </div>
                                </div>
                            </div>
                            <div class="col-md-6">
                                <div class="form-group last">
                                    <label class="col-md-4 control-label" for="category">操作标识<span
                                            class="required"> * </span></label>

                                    <div class="col-md-8">
                                        <select class="form-control input-medium" id="category" name="category">
                                            <option value="1">输入</option>
                                            <option value="2">输出</option>
                                            <option value="3">输入&输出</option>
                                            <option value="4">中间值</option>
                                            <option value="0">其他</option>
                                        </select>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-md-12">
                                <div class="form-group last">
                                    <label class="col-md-2 control-label"><spring:message
                                            code="formulaDescription"/><span
                                            class="required"> * </span></label>

                                    <div class="col-md-10">
                                        <input type="text" style="width: 694px" class="form-control"
                                               placeholder="<spring:message code="formulaDescription"/>"
                                               id="formulaDescription" name="formulaDescription">
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn blue" id="addBtn"><spring:message code="save"/></button>
                <button type="button" class="btn blue" id="updateBtn"><spring:message code="save"/></button>
                <button type="button" class="btn default" data-dismiss="modal"><spring:message code="close"/></button>
            </div>
        </div>
    </div>
</div>
<jsp:include page="../includes/confirmdiv.jsp"/>
<%@include file="../includes/footer.jsp" %>
<%@include file="../includes/bottomscript.jsp" %>
<script type="text/javascript"
        src="<c:url value="/js/bower_components/DataTables/media/js/jquery.dataTables.min.js"/>"></script>
<script type="text/javascript"
        src="<c:url value="/js/global/plugins/datatables/plugins/bootstrap/dataTables.bootstrap.js"/>"></script>
<script type="text/javascript"
        src="<c:url value="/js/bower_components/ztree_v3/js/jquery.ztree.core-3.5.min.js"/>"></script>
<script type="text/javascript"
        src="<c:url value="/js/bower_components/ztree_v3/js/jquery.ztree.excheck-3.5.min.js"/>"></script>
<script src="<c:url value="/js/global/scripts/datatable.js"/>"></script>
<script src="<c:url value="/js/expression/expression.js"/>"></script>
<script type="text/javascript">
    $(function () {
        expressionListTable.init(${tree})
    });
</script>
</body>
</html>
